<template>
	<div class="hh">
		剩余支付时间:{{time}}
	</div>
</template>

<script>
export default {
	name: 'WanjunHome',

	data() {
		return {
			time:"",
			seconds:864000
		};
	},

	mounted() {
		this.Time()
	},

	methods: {
		timeshi(){
			let t=parseInt(this.seconds/(24*60*60))
			t=t<10?"0"+t:t
			let s=parseInt(this.seconds/(60*60)%24)
			s=s<10?"0"+s:s
			let f=parseInt(this.seconds/60%60)
			f=f<10?"0"+f:f
			let m=parseInt(this.seconds%60)
			m=m<10?"0"+m:m
			this.time=t+'天'+s+'时'+f+'分'+m+'秒'
		},
		Time(){
			setInterval(()=>{
				this.seconds-=1
				this.timeshi()
			},1000)
		}	
	},
};
</script>

<style lang="scss" scoped>
.hh{
	width: 300px;
	height: 30px;
	background-color: black;
	color: white;
	line-height: 30px;
	text-align: center;
}
</style>